#!/bin/bash
# 使用阿里源安装 docker
# used for centos7 , ubuntu
# By dargonli 

[[ $UID -ne 0 ]] && { echo "Must run in root user !";exit; }

#CentOS / RHEL / Fedora
if [[ -f /etc/redhat-release ]];then
  cat ./docker.centos.sh |bash

#Debian / Ubuntu
elif [[ -f /etc/debian_version ]];then
  cat ./docker.ubuntu.sh |bash

else
  echo "I don't know the OS"
  exit
fi

##############################